<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="../js/axios.js"></script>
	</head>
	<body>
		<h1>Axios测试案例=1</h1>
		<script>
			// var url = "http://localhost:8080/hello
			// axios.get(url)
			// 	.then(function(result){
			// 		console.log(result)
			// 		})
			//-------------------------------------------------------		
			// let url1 = "http://localhost:8080/axios/getUserById"
			// axios.get(url1)
			// 	.then(function(promise){
			// 		console.log(promise.data)
			// 	})
				
			//-----------------------------------------------------
				// let user2 = {name:"tomcat",age:100}
				// let url2 = "http://localhost:8080/axios/getUserByNA"
				// axios.get(url2,{params:user2})
				// 	.then(function(promise){
				// 		console.log(promise.data)
				// 	})
					
					
			let user3 = {name:"不知道",sex:"未知"}
			let url3 = `http://localhost:8080/axios/findUserByNS/${user3.name}/${user3.sex}`
			let html = `<div>
						<p>AAA</p>
						<p>BBB</p>
						</div>`
						
						axios.get(url3)
							.then(function(promise){
								console.log(promise.data)
							})
		</script>
	</body>
</html>
